package com.lo23.data.serializable;


import com.lo23.data.objpicture.*;

import java.util.*;

import javax.swing.ImageIcon;

import java.io.Serializable;


/*
 * Serializable class of Picture
 * 
 * 
 */

public class PictureCom implements Serializable {

	private static final long serialVersionUID = 1L;
	public String pID;
	public List<CommentSer> commentSerList; 
	public double mark;
	public String title;
	public String description;
	public ImageIcon picture;
	public String owner;
	public List<String> keywords;


	public PictureCom(Picture pic, String uid){
		owner = uid;
		pID = pic.getpID();
		commentSerList = new ArrayList<CommentSer>();
		List<Comment> commentList = pic.getListOfComments();
		for(Comment item: commentList){
			CommentSer com = new CommentSer(item);
			commentSerList.add(com);	
		}
		
		keywords = pic.getKeywords();
		mark = pic.getCalcMark();
		title = pic.getTitle();
		description = pic.getDescription();
		picture = pic.getPicture();

	}

	

	

}

